<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>

<head>
	<script type="text/javascript">

		function serchContract(){
			var idLabArray = document.forms[0].idLabDep.value.split("-");
			document.forms[0].laboratorio.value = idLabArray[0];
			document.forms[0].departamento.value = idLabArray[1];
			document.forms[0].action = "buscarContratoAction";
			document.forms[0].submit();
		}
	</script>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>LABTEC - Buscar Revision de Contrato</title>
</head>

<body>
	<div id="header">
		    <jsp:include page="../jsp/menuIniciador.jsp" />
	</div>
	<div class="sheet">
		<div class="sheet-tl"></div>
		<div class="sheet-tr"></div>
		<div class="sheet-bl"></div>
		<div class="sheet-br"></div>
		<div class="sheet-tc"></div>
		<div class="sheet-bc"></div>
		<div class="sheet-cl"></div>
		<div class="sheet-cr"></div>
		<div class="sheet-cc"></div>
		<div class="sheet-body">
			<s:form action="buscarContratoAction" theme="simple">
				<s:hidden name="typeModif"></s:hidden>
				<table width="100%" border="0" cellpadding="10">
					<tr>
						<td colspan="4" class="postmetadataheader">
							<h2 class="postheader">
								Busqueda de Revisiones de Contrato
							</h2>
						</td>
					</tr>
				
					<tr>
						<td width="20%">
							Numero de Contrato
						</td>
						<td width="30%">
							<s:textfield name="idContratoBus"></s:textfield>
							<s:hidden name="idContrato"></s:hidden>
						</td>
						<td width="20%">
							Año del Contrato
						</td>
						<td width="30%">
							<s:textfield name="anioContratoBus"></s:textfield>
							<s:hidden name="anioContrato"></s:hidden>
						</td>
					</tr>
										
					<tr>
						<td width="20%">
							Aceptación del Contrato
						</td>
						<td width="30%">
							<s:radio name="acuerdoTrabajo" list="#{'1':'Si','0':'No','':'Todos'}" />
						</td>
						<td width="20%">
							Recibio elementos
						</td>
						<td width="30%">
							<s:radio name="recibioElem" list="#{'1':'Si','0':'No','':'Todos'}"/>
						</td>
					</tr>
					
					<tr>
						<td width="20%">
							Laboratorio
						</td>
						<td width="30%">
							<s:select name="idLabDep" listKey="idLaboratorio" listValue="nombreLab" list="listaLab"/>
							<s:hidden name="laboratorio"></s:hidden>
							<s:hidden name="departamento"></s:hidden>
						</td>
						<td width="20%">
						</td>
						<td width="30%">
						</td>
					</tr>
					
					<tr>
						<td width="20%">
							Razón Social
						</td>
						<td width="30%">
							<s:textfield name="razonSocial"></s:textfield>
						</td>
						<td width="20%">
							CUIT
						</td>
						<td width="30%">
							<s:textfield name="cuit"></s:textfield>
						</td>
					</tr>
					
					<tr>
						<td width="20%">
							Rubro
						</td>
						<td width="30%">
							<s:textfield name="rubro"></s:textfield>
						</td>
						<td width="20%">
							Responsable
						</td>
						<td width="30%">
							<s:textfield name="responsable"></s:textfield>
						</td>
					</tr>							

				</table>
				
				<table width="100%" border="0">
					<tr height="50px">
						<td  align="right">
							<input type="button" value="Buscar" name="buscar" onclick="serchContract();"/>
						</td>
					</tr>
				</table>
			</s:form>
			
			<s:if test="%{!resultList.isEmpty()}">
				<jsp:include page="../jsp/revisionDeContrato-resultado.jsp"></jsp:include>
			</s:if>
						
		</div>

	</div>
</body>
</html>